﻿using System.Collections.Generic;
using Xunit;

namespace Sustainalytics.ESGRatings.BusinessLogic.Computing.Tests
{
    internal class IndicatorConfigElement
    {
        public string Code { get; set; }
        public string Theme { get; set; }
        public string Cluster { get; set; }
    }

    public class IndicatorsConfigurationTests
    {
        [Fact]
        public void GetConfigurationForTest()
        {
            var builder = new IndicatorsConfiguration.IndicatorsConfigurationBuilder("E", "S", "G");
            var list = new List<IndicatorConfigElement>
            {
                
                new IndicatorConfigElement(){Code="E.1.1",​ Theme="E",Cluster="P​​"},
                new IndicatorConfigElement(){Code="E.1.2",​ Theme="E",Cluster="P​​"},
                new IndicatorConfigElement(){Code="E.1.12",Theme="E",Cluster="QLP"},
                new IndicatorConfigElement(){Code="E.2.2",​ Theme="E",​Cluster="QLP"},
                new IndicatorConfigElement(){Code="E.1.4",​ Theme="E",Cluster="QNP"},
                new IndicatorConfigElement(){Code="G.1.4",​ Theme="G",Cluster="D"},
                new IndicatorConfigElement(){Code="G.1.1",​ Theme="G",Cluster="P​​"},
                new IndicatorConfigElement(){Code="S.1.1",​ Theme="S",Cluster="P​​"},
                new IndicatorConfigElement(){Code="S.1.2", Theme="S",Cluster="QLP"},
            };

            foreach (var item in list)
            {
                builder.AddIndicator(item.Code, item.Theme, item.Cluster);
            }

            var configuration = builder.Build();
            Assert.NotNull(configuration);
        }
    }
}
